program DistLineToPlane;

{$APPTYPE CONSOLE}
var
xa, ya, za : real;
xb, yb, zb : real;
x1, y1, z1, x2, y2, z2, x3, y3, z3 : real;
dist1, dist2 : real;
a, b, c, d: real;
factor : real;
begin
  readln(x1, y1, z1);
  readln(x2, y2, z2);
  readln(x3, y3, z3);
  readln(xa, ya, za);
  readln(xb, yb, zb);
  a := (y1-y2)*(z2-z3)-(y2-y3)*(z1-z2);
  b := -((x1-x2)*(y2-y3)-(x2-x3)*(z1-z2));
  c := (x1-x2)*(y2-y3)-(x2-x3)*(y1-y2);
  d := -(a*x1+b*y1+c*z1);
  factor := a*a+b*b+c*c;
  if (factor=0) then begin writeln('This plane is not able to be');end else
  begin
    dist1 := (a*xa+b*ya+c*za+d)/(sqrt(a*a+b*b+c*c));
    dist2 := (a*xb+b*yb+c*zb+d)/(sqrt(a*a+b*b+c*c));
  end;
  if (dist1=dist2) then writeln(abs(dist1));
  if (dist1<>dist2) then writeln('0');
end.
 